<template>
  <div class="app-container">
    <h1>欢迎使用</h1>  
    <div class="info">
      <el-row :gutter="12">
        <el-col :span="8">
          <el-card shadow="always"> 返回值 <br /><br /> {{ data }} </el-card>
        </el-col>
      </el-row>
    </div>
    <div class="boom">
      <el-button type="primary" @click="onTest">测试</el-button>
    </div>
  </div>
</template>

<script>
import { mapGetters } from 'vuex'
import { test } from '@/api/wxjava'
import { ElMessageBox, ElMessage } from 'element-plus'
export default {
  name: 'Dashboard',
  data() {
    return {
      data: {},
      listQuery: {text: '测试'}
    }
  },
  created() {
    
  },
  methods: {
    onTest() {
      test(this.listQuery).then(response => {
        if (response.success && response.data != null) {
          this.data = response.data
        }
      }).catch(() => {
      })
    }
  },
  computed: {
    ...mapGetters([
      'roles'
    ])
  }
}
</script>
<style scoped>
.info {
  text-align: center;
}
.boom {
  padding: 20px;
}
</style>